Chris Pollett > Old Classes >
CS174

( Print View )

Student Corner:
  [Grades Sec1]
  [Grades Sec2]
  [Grades Sec3]

  [Submit Sec1]
  [Submit Sec2]
  [Submit Sec3]

  [Class Sign Up Sec1]
  [Class Sign Up Sec2]
  [Class Sign Up Sec3]

  [
Lecture Notes]
  [Discussion Board]

Course Info:
  [Texts & Links]
  [Topics/Outcomes]
  [Outcomes Matrix]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Additional Policies]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












HW#2 --- last modified February 28 2019 23:07:51..

Solution set.

Due date: Oct 3

Files to be submitted:
  Hw2.zip

Purpose: To gain experience with server-side includes, cascading style sheets, and Javascript.

Related Course Outcomes:

The main course outcomes covered by the coding part of this assignment are:

(1) Write HTML documents containing standard HTML elements including forms, tables, client-side scripts, and server-side scripts,

(3) Write server-side scripts that process HTML forms,

and(4) Write client-side scripts that validate HTML forms.

Specification:

For this assignment you are to pretend you are developing an intranet for a medium size corporation. You are not an administer of this company's website and Apache has been configured so that the only server-sider scripting you can do is with server-side includes (SSI). No Perl, ASP, JSP, PHP, Ruby, etc. is available. Your intranet needs to have a login page with a form asking for a 5 digit Employee ID and a password. A valid Employee ID consists of only numbers and you should use Javascript to validate this before sending the login form. Since we only have SSI the form data has to be sent using the GET method. So as not to send login and password data in the clear, your Javascript should in addition to validating the form data should also apply a simple hash function of your choice to the data before it is GET'd. (A similar technique is used by Yahoo! when non-secure logins are done to their e-mail.) Any page on your intranet should check that the QUERY_STRING contains a valid login and password; otherwise, it should give an error message.

Your medium size company has two kinds of employees: A CEO and many Serfs. When the CEO logs in and views the intranet, it should always be in a two column layout: a left column used to display useful navigational links for the intranet and a central column used to display content that might be navigated to. When a Serf logs in and views the intranet, the pages should always be in a three column layout, in addition to the left and central column, there should be a rightmost column that displays advertisements concerning the company. You are only allowed to use div tags and style directives to create the two or three column formats. You are not allowed to use frames, iframes, objects, tables, etc. At a minimum, the left hand column should have links to three departments of your company. Clicking on these links should display information about that department. When a Serf is logged, the advertisement that is displayed should be randomly chosen from at least five advertisements. The advertisement, though, like the content column, must be included on the server-side. Be creative on department description and advertisements. Submit all your files in Hw2.zip . Include in this file also a short readme.txt file explaining how to deploy your intranet and how to test CEO versus Serf mode.

Pages in this assignment validate as XHTML 1.1 1pt
Login page form data is validated by Javascript 1pt
Form data is encrypted in the QUERY_STRING, intranet pages display only if this is a legal login and password of an employee. 2pts
Two and three column layouts done using div tags and styles. 2pts
CEO layout used when CEO logs in; Serf layout used otherwise 2pts
Content column changes as described above when different department links clicked 1pt
Which advertisement is included in Serf mode is randomly chosen. 1pt
Total10pts